package org.hyl.javabase.schoolmodel;


import java.util.Calendar;

public class p201707005 {
   
	public static void main(String[] args){
		
		p201707005 p=new p201707005();
		p.demo4();
		
		
	}
	
	public void demo1(){
		
		teacher t =new teacher();
		System.out.println(t.name);
	}
	
	public void demo2(){
		
		banji b =new banji();
		b.addStudent("xiao zou");
		b.addStudent("xiao hang");
		b.addStudent("xiao qiang");
		b.addStudent("xiao min");
		b.addStudent("xiao a1");
		b.addStudent("xiao a2");
		b.addStudent("xiao a3min");
		b.addStudent("xiao a4");
		b.addStudent("xiao a5");
		
		
		for (int i=0 ;i<b.stui;i++){
			student t =b.stus[i];
			System.out.println(t.name);
		}
	}
	
	public void demo3(){
		//int [] a=new int[10];
		//String [] a=new String[10];
		student [] a=new student[10];
		//  a锟斤拷锟斤拷锟斤拷锟斤拷 锟斤拷为锟斤拷指锟斤拷  student锟斤拷锟斤拷栈 锟斤拷锟斤拷始位锟斤拷
		//  锟斤拷锟斤拷10锟斤拷指锟斤拷student 锟斤拷锟酵碉拷栈锟秸硷拷
		int i=0;
		
		student  s=	new student() ; 
		//锟斤拷锟节达拷锟叫匡拷锟斤拷一锟斤拷锟窖匡拷 锟斤拷锟斤拷锟斤拷锟铰的讹拷锟斤拷 student  锟斤拷锟斤拷锟斤拷始锟斤拷址 锟侥憋拷锟斤拷锟斤拷锟斤拷s		 		
		a[i]=s;//锟窖讹拷锟斤拷牡锟街凤拷锟� 锟斤拷锟斤拷锟侥筹拷锟秸伙拷占锟�
		s.id=10;
		i++;
				
	
				
//		a[i]=8; 
//		i++;
	
		for(student b :a){			
			//System.out.println(b.id);
			System.out.println(b);
		}
		
//		for(i=0;i<10 ;i++){			
//			System.out.println(a[i]);
//		}
	}

	
	public void demo4(){
		banji b =new banji();
		student s1=b.addStudent("xiao zou");
		//s1.addScore("yw",89,1);
		s1.addScore("sx",90,1);
		s1.addScore("yy",89,1);
		
		student s2=b.addStudent("xiao hang");
		//s2.addScore("yw",89,0);
		s2.addScore("sx",100,0);
		s2.addScore("yy",89,0);
		
		
		s2.addScore("yw",99,1);
		//s2.addScore("sx",100,1);
		s2.addScore("yy",95,1);
		student s3=b.addStudent("xiao qiang");
		s3.addScore("yw",34,0);
		s3.addScore("sx",54,0);
		s3.addScore("yy",20,0);
		
		for (int i=0 ;i<b.stui;i++){
			student t =b.stus[i];
			System.out.println(t.name);
			
			for (int j=0 ;j<t.ss[5][0].length;j++){
				score s= t.ss[5][0][j];//null; 
				if (s==null) continue;
				System.out.println(s.z_course+":"+s.xq+":"+s.score);
			}
			for (score s:t.ss[5][1]){	
				if (s==null) continue;
				System.out.println(s.z_course+":"+s.xq+":"+s.score);
			}
			
		}
	}
	
	public void demo5(){
		
	}

}
